package com.liliudong.cursormate.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liliudong.cursormate.entity.SysPermission;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author Liudong.li
 * @description 针对表【sys_permission(系统权限表)】的数据库操作Mapper
 * @createDate 2023-10-24 22:29:24
 * @Entity com.liliudong.cursormate.entity.SysPermission
 */
@Mapper
public interface SysPermissionMapper extends BaseMapper<SysPermission> {

    /**
     * 按角色id选择列表
     *
     * @param roleId 角色id
     * @return {@link List}<{@link SysPermission}>
     */
    List<SysPermission> selectListByRoleId(Long roleId);

    /**
     * 选择权限列表拦截器忽略
     *
     * @return {@link List}<{@link SysPermission}>
     */
    @InterceptorIgnore
    List<String> selectPermissionListInterceptorIgnore();

    /**
     * 通过用户id拦截器忽略选择权限列表
     *
     * @param userId 用户id
     * @return {@link List}<{@link String}>
     */
    List<String> selectPermissionListByUserIdInterceptorIgnore(Long userId);
}




